aic_art_collection¶import os
import pandas as pd
import numpy as np
import json
import requests
import altair as alt
from PIL import Image
from io import BytesIO
from IPython.display import display, HTML
from aic_art_collection import aic_art_collection
pip install -i https://test.pypi.org/simple/ aic-art-collection
Looking in indexes: https://test.pypi.org/simple/ Collecting aic-art-collection Downloading https://test-files.pythonhosted.org/packages/22/c7/d956f74db4695a447f2e98d92f58371c0b44451eb2e0b5d88d8b3c575741/aic_art_collection-0.2.5-py3-none-any.whl (5.2 kB) Installing collected packages: aic-art-collection Successfully installed aic-art-collection-0.2.5 Note: you may need to restart the kernel to use updated packages.
help(aic_art_collection)
Help on module aic_art_collection.aic_art_collection in aic_art_collection:
NAME
aic_art_collection.aic_art_collection
FUNCTIONS
get_image(image)
A function to print the quried keyword. A user can query artworks by the name of an aritst or by the name of an artwork.
Parameters:
-------------
query: str
A keyword to query.
Returns:
-------------
viz: a collection of images on the queried by a user.
Example:
-------------
>>> a visualization of the queried word appeared over time at the Art Institute of Chicago.
get_museum_tour(tour)
Function to retrieve the information about current tours at the Art institute of Chicago.
Parameters:
-------------
tour: str
A keyword to query; keyword can be any string that indicates a tour name, title of artwork, an exhibition name, or an artist's name.
Returns:
-------------
tour_info
Example:
-------------
>>> get_museum_tour('cezanne tour')
no error (successfully made request)
id ... artist_titles
0 4999 ... [Paul Cezanne, Paul Cezanne, Paul Cezanne, Pau...
1 4989 ... [Paul Cezanne, Paul Cezanne, Paul Cezanne, Pau...
2 2193 ... [Archibald John Motley Jr., Grant Wood, Olowe ...
3 1023 ... [Adler & Sullivan, Architects]
4 4197 ... [Archibald John Motley Jr., Felix Gonzalez-Tor...
5 5155 ... []
6 3246 ... [Grant Wood, Olowe of Ise, Yoruba, Aztec (Mexi...
7 4551 ... [Ancient Roman, Ancient Roman, Ancient Mesopot...
8 5164 ... []
9 4671 ... [René Magritte, Max Ernst, Joan Miró, Claude C...
[10 rows x 7 columns]
get_search_artwork(artwork)
Retrieve the information about collections in the Art Institute of Chicago
Parameters:
-------------
artwork: Write any key word to query. It can be the name of an artist, an artwork, the place where an artwork was created, date, or the type of the work.
Returns:
-------------
Status code: str
Status code is issued by a server in response to a client's request made to the server.
Dataframe: df
Includes the detailed information about artworks that were queried.
Example:
-------------
>>> get_search_artwork('1984')
200 OK success response code. The request has succeeded.
id ... category_titles
0 189594 ... [Prints and Drawings]
1 121115 ... [Photography and Media, Latin American]
2 103026 ... [Architecture and Design]
3 102229 ... [Contemporary Art, Chicago Artists, SAIC Alumn...
4 185062 ... [Photography and Media]
5 151231 ... [Prints and Drawings]
6 76934 ... [Photography and Media]
7 187165 ... [Contemporary Art, Essentials, Women artists]
8 131385 ... [Prints and Drawings, Essentials, Women artists]
9 212224 ... [Photography and Media]
[10 rows x 7 columns]
post_popularity_stat(query)
Objects mentioning the queried keyword accessioned to the Art Institute of Chicago
This function counts the frequency of the keyword over time.
Parameters:
-------------
query: str
A keyword to query; keyword can be any string that indicates a tour name, title of artwork, an exhibition name, or an artist's name.
Returns:
-------------
chart: a visualization of the frequency of the queried word appeared over time at the Art Institute of Chicago.
Example:
-------------
>>> a visualization of the queried word appeared over time at the Art Institute of Chicago.
FILE
/Users/user/miniforge3/lib/python3.10/site-packages/aic_art_collection/aic_art_collection.py
help(aic_art_collection.get_search_artwork)
Help on function get_search_artwork in module aic_art_collection.aic_art_collection:
get_search_artwork(artwork)
Retrieve the information about collections in the Art Institute of Chicago
Parameters:
-------------
artwork: Write any key word to query. It can be the name of an artist, an artwork, the place where an artwork was created, date, or the type of the work.
Returns:
-------------
Status code: str
Status code is issued by a server in response to a client's request made to the server.
Dataframe: df
Includes the detailed information about artworks that were queried.
Example:
-------------
>>> get_search_artwork('1984')
200 OK success response code. The request has succeeded.
id ... category_titles
0 189594 ... [Prints and Drawings]
1 121115 ... [Photography and Media, Latin American]
2 103026 ... [Architecture and Design]
3 102229 ... [Contemporary Art, Chicago Artists, SAIC Alumn...
4 185062 ... [Photography and Media]
5 151231 ... [Prints and Drawings]
6 76934 ... [Photography and Media]
7 187165 ... [Contemporary Art, Essentials, Women artists]
8 131385 ... [Prints and Drawings, Essentials, Women artists]
9 212224 ... [Photography and Media]
[10 rows x 7 columns]
help(aic_art_collection.get_museum_tour)
Help on function get_museum_tour in module aic_art_collection.aic_art_collection:
get_museum_tour(tour)
Function to retrieve the information about current tours at the Art institute of Chicago.
Parameters:
-------------
tour: str
A keyword to query; keyword can be any string that indicates a tour name, title of artwork, an exhibition name, or an artist's name.
Returns:
-------------
tour_info
Example:
-------------
>>> get_museum_tour('cezanne tour')
no error (successfully made request)
id ... artist_titles
0 4999 ... [Paul Cezanne, Paul Cezanne, Paul Cezanne, Pau...
1 4989 ... [Paul Cezanne, Paul Cezanne, Paul Cezanne, Pau...
2 2193 ... [Archibald John Motley Jr., Grant Wood, Olowe ...
3 1023 ... [Adler & Sullivan, Architects]
4 4197 ... [Archibald John Motley Jr., Felix Gonzalez-Tor...
5 5155 ... []
6 3246 ... [Grant Wood, Olowe of Ise, Yoruba, Aztec (Mexi...
7 4551 ... [Ancient Roman, Ancient Roman, Ancient Mesopot...
8 5164 ... []
9 4671 ... [René Magritte, Max Ernst, Joan Miró, Claude C...
[10 rows x 7 columns]
aic_art_collection.get_museum_tour('Tour')
no error (successfully made request)
| id | title | image | description | intro | artwork_titles | artist_titles | |
|---|---|---|---|---|---|---|---|
| 0 | 2193 | The Essentials Tour | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>Discover the stories behind some of the mus... | <p>Indulge in the sunlit bank of the River Sei... | [Nightlife, American Gothic, Veranda Post (Òpó... | [Archibald John Motley Jr., Grant Wood, Olowe ... |
| 1 | 1023 | The Architecture Tour | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>Uncover the secrets of the museum’s storied... | <p>The Art Institute of Chicago reaches across... | [Chicago Stock Exchange Trading Room: Reconstr... | [Adler & Sullivan, Architects] |
| 2 | 4197 | The Teen Tour | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>Experience the museum through sounds and st... | <p>Expand your perspective on the Grand Stairc... | [Nightlife, "Untitled", America Windows, Paper... | [Archibald John Motley Jr., Felix Gonzalez-Tor... |
| 3 | 4999 | Cezanne Verbal Description Tour | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>Designed for people with impaired vision: D... | <p>This verbal description tour is designed fo... | [Auvers, Panoramic View, The Three Skulls, Mad... | [Paul Cezanne, Paul Cezanne, Paul Cezanne, Pau... |
| 4 | 5155 | Sophie Calle Verbal Description Tour | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>Designed for people with impaired vision, b... | <p>“I met people who were born blind. Who had ... | [] | [] |
| 5 | 3246 | Verbal Description tour: The Essentials | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>Designed for people with impaired vision: D... | <p>Bask on the sunlit bank of the Seine in Geo... | [American Gothic, Veranda Post (Òpó Ògògá), Co... | [Grant Wood, Olowe of Ise, Yoruba, Aztec (Mexi... |
| 6 | 4551 | Myth and Scandal | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>The Myth and Scandal tour tells some of the... | <p>Come learn about the juicy histories and ch... | [Statue of Young Dionysos, Statue of the Aphro... | [Ancient Roman, Ancient Roman, Ancient Mesopot... |
| 7 | 5164 | The Language of Beauty in African Art | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>The Language of Beauty in African Art audio... | <p>This tour features a collection of perspect... | [] | [] |
| 8 | 4671 | How to Make a Surrealist Artwork | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>Can a wine rack be a work of art? How can d... | <p>What lies beneath the surface of consciousn... | [Time Transfixed, Forest and Sun, The Policema... | [René Magritte, Max Ernst, Joan Miró, Claude C... |
| 9 | 4235 | Life, Death, and Salvation: Stories of the Ren... | http://aic-mobile-tours.artic.edu/sites/defaul... | <p>Come learn how Reliquaries were used as sid... | <p>On this tour, curators Martha Wolff and Reb... | [Wine Cistern, Reliquary Monstrance with a Too... | [Francesco Durantino, Weddeghe Velstede, Berna... |
help(aic_art_collection.post_popularity_stat)
Help on function post_popularity_stat in module aic_art_collection.aic_art_collection:
post_popularity_stat(query)
Objects mentioning the queried keyword accessioned to the Art Institute of Chicago
This function counts the frequency of the keyword over time.
Parameters:
-------------
query: str
A keyword to query; keyword can be any string that indicates a tour name, title of artwork, an exhibition name, or an artist's name.
Returns:
-------------
chart: a visualization of the frequency of the queried word appeared over time at the Art Institute of Chicago.
Example:
-------------
>>> a visualization of the queried word appeared over time at the Art Institute of Chicago.
aic_art_collection.post_popularity_stat('France')
/Users/user/miniforge3/lib/python3.10/site-packages/altair/utils/core.py:317: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. for col_name, dtype in df.dtypes.iteritems():
from ivpy import attach,show
aic_art_collection.get_image('France')
aic_art_collection.get_image('Henri Matisse')
aic_art_collection.get_image('Monet')
aic_art_collection.get_image('Chagall')
aic_art_collection.get_image('Hokusai')
aic_art_collection.get_image('Korea')
aic_art_collection.get_image('edgar degas')